<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //   function Person() {}
      //   const Person = function(){}

      //   class Person {}
      // 可以被赋值
      const Person = class {}; //类表达式
      const p1 = new Person();

      // 可以被返回
      function createClass() {
        const Person = class {}; //类表达式
        return Person;
      }
      const Human = createClass();
      const h1 = new Human(); // new createClass()()
    </script>
  </body>
</html>
